import React, { Component,Suspense } from 'react';
import { Route,Switch,Redirect } from 'react-router-dom';

import '../styles/Register.scss'
import Header from '../components/Header';
import index from './Registers/index'
import sms from './Registers/sms';
import pwd from './Registers/pwd';
class Register extends Component {
    constructor(props){
        super(props)
        this.state={
            visible:false,
        }
    }
    render() {
        return (
            <div className='register'>
             <Header/>
            <Suspense>
              <Switch>
                <Route path="/register/index" component={index} />
                <Route path="/register/sms" component={sms} />
                <Route path="/register/pwd" component={pwd} />
                <Redirect exact from='/register' to="/register/index" /> //路由重定向
                {/* <Route path="*" component={NotFound} /> //404路由 */}
               </Switch>
            </Suspense>
                
            </div>
        );
    }
}

export default Register;
